﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class appleader_weight_insertRuleWeight : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        if (Request["ruleid"] != null)
        {
            int ruleid = int.Parse(Request["ruleid"].ToString());
            MasApp.Model.weight we = new MasApp.Model.weight();
            we.Elementid = ruleid;
            we.Elementtype = "准则";
            we.Weightvalue = Convert.ToSingle(tb_ruleWeight.Text);
            if (MasApp.BLL.reg.RegWeight(we) > 0)
            {
                MasApp.BLL.ResponseHelper.alert("插入成功", "direct.aspx?projectid=" + Session["currentprojectid"].ToString());
            }
            else
            {
                MasApp.BLL.ResponseHelper.alert("失败", "direct.aspx?projectid=" + Session["currentprojectid"].ToString());
            }
        }
    }
}
